﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Weblications.Sango.Entities;

namespace Pixysoft.Weblications.Sango.Environment
{
    class PtyPartyBattleSettingHelper
    {
        private static List<Pty_Partybattlesetting> orms = new List<Pty_Partybattlesetting>();

        public static void initialize()
        {
            orms = SettingHelper.GetNoebe().EntityNoebeCommand.Select<Entities.Pty_Partybattlesetting>();
            LoggerHelper.Info("initialize Pty_Partybattlesetting.count:{0}", orms.Count);
        }


        public static List<Pty_Partybattlesetting> searchAll()
        {
            return orms;
        }

        public static List<Pty_Partybattlesetting> searchTeam(long resourceserialcode)
        {
            List<Pty_Partybattlesetting> list = new List<Pty_Partybattlesetting>();

            foreach (Pty_Partybattlesetting orm in orms)
            {
                if (orm.Resourceserialcode == resourceserialcode)
                    list.Add(orm);
            }

            return list;
        }
    }
}
